package com.springmvc.springbootOne.util;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import com.google.common.collect.Maps;

public class Pagebean implements Serializable {
	private static final long serialVersionUID = -8130141566178040255L;
	
	private int page;	//easyui参数：第几页
	private List rows;	//easyui参数：每页记录数
	private int offset; //分页起始码
	private int total;  //记录总个数
	private int pagesize;//每页多少条
	private List childRows;
	
	private Map<String, Object> condition = Maps.newHashMap(); // 查询条件

	public Pagebean(){
		
	}
	
	public Pagebean(int page,int pagesize){
		this.page = page;
		this.pagesize = pagesize;
		this.offset = (page-1)*pagesize;
	}
	
	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}



	public void setOffset(){
		//this.offset = (page-1)*pagesize;
	}
	public int getOffset() {
		
		return offset;
	}

	public Map<String, Object> getCondition() {
		return condition;
	}

	public void setCondition(Map<String, Object> condition) {
		this.condition = condition;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public List getRows() {
		return rows;
	}

	public void setRows(List rows) {
		this.rows = rows;
	}

	public int getPagesize() {
		return pagesize;
	}

	public void setPagesize(int pagesize) {
		this.pagesize = pagesize;
	}

	public List getChildRows() {
		return childRows;
	}

	public void setChildRows(List childRows) {
		this.childRows = childRows;
	}

	
	
}
